<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.2.45/vue.global.min.js"></script>
    <link rel="stylesheet" href="../04-2/css.css/css.css">
    <title>Document</title>
</head>
<body>
    <div class="in">
            
            <div class="left">
                <button v-on:click="text+=1">切换显示状态</button>
                <div v-if="text%2==0"><img src="D:\pic/421.jpg" style="width: 500px;"></div>
            </div>


            <div class="right">
                <button v-on:click="count+=9">增加年龄</button>
                <button v-on:click="count-=1">减小年龄</button>
                <div>年龄满足18岁,可以入党.目前年龄：{{count}}</div>
                <div v-if="count>=18"><img src="D:\pic/422.jpg" style="width: 500px;"></div>
            </div>
    </div>
    <script>
        const v={
            data(){
                return{
                    count:0,
                    text:1
                }
            }
        }
        Vue.createApp(v).mount(".in")
    </script>
</body>
</html>